import { request } from "@/utils/service"

/** 增 */
export function createCommentApi(data: any) {
  return request({
    url: "product-reviews/add",
    method: "post",
    data
  })
}

/** 删 */
export function deleteCommentApi(data: any) {
  return request({
    url: `product-reviews/delete`,
    method: "post",
    data
  })
}

/** 改 */
export function updateCommentApi(data: any) {
  return request({
    url: "product-reviews/update",
    method: "post",
    data
  })
}

/** 查 */
export function getCommentApi(params: any) {
  return request({
    url: "/product-reviews/list",
    method: "get",
    params
  })
}

// 详情
export function getCommentDetailApi(data: any) {
  return request({
    url: `product-reviews/byId`,
    method: "get",
    data
  })
}
